if [ x$2 = x ]; then
    echo usage: "$0 <var_name> <file_name> <header_file>"
    exit 1
fi
 
VARNAME=$1
INPUT=$2
HEADER=$3
 
echo "/* -*- C -*- */" > $HEADER
echo "static const char $VARNAME [] = \"\"" >> $HEADER
sed 's/"/\\"/g' $INPUT | sed 's/^\(.*\)$/"\1\\n"/' >> $HEADER || exit $?
echo ";" >> $HEADER
